package com.loong.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.loong.framework.constant.SystemConst;
import com.loong.system.entity.Config;
import com.loong.system.mapper.ConfigMapper;
import com.loong.system.service.IConfigService;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * @author 47349
 * @description 针对表【sys_config(项目配置表)】的数据库操作Service实现
 * @createDate 2024-01-18 03:58:22
 */
@Service
public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements IConfigService {

  @Override
  public List<Config> getPreviewConfig() {
    return this.lambdaQuery()
        .in(
            Config::getConfigName,
            SystemConst.WinPreview,
            SystemConst.LinuxPreview,
            SystemConst.WinThumbnailPreview,
            SystemConst.LinuxThumbnailPreview)
        .list();
  }
}
